package com.dao.qsl;

import com.util.qsl.Dbutil;
import org.springframework.stereotype.Repository;

import java.sql.Connection;
import java.sql.PreparedStatement;

@Repository
public class XiuGai {
      public Boolean xg(int  xgfwsl,String xgkssj,String xgjssj,int bh){

            Dbutil d=new Dbutil();
            Connection c=null;
            try {
                  c=d.getConnection();
                  String sql="UPDATE service SET fwsl=?,kssj=?,jssj=? WHERE fwbh=?";
                  PreparedStatement pr=c.prepareStatement(sql);

                  pr.setInt(1,xgfwsl);
                  pr.setString(2,xgkssj);
                  pr.setString(3,xgjssj);
                  pr.setInt(4,bh);

                  int i=pr.executeUpdate();

                  if(i>0){
                        return true;
                  }else {
                        return  false;
                  }
            }catch (Exception e){
                  e.printStackTrace();
            }
            return  false;

      }
}
